home *** CD-ROM | disk | FTP | other *** search
/ Champak 64 / Volume 64 - JOGO DISK .iso / Games / the_best_every_day.swf / scripts / __Packages / MCBanana.as < prev    next >
Text File  |  2008-04-10  |  1KB  |  60 lines

  1. class MCBanana extends MCObstacles
  2. {
  3.    var STRING_TYPE = "Banana";
  4.    function MCBanana()
  5.    {
  6.       super(this.STRING_TYPE);
  7.       this._visible = false;
  8.    }
  9.    function activate()
  10.    {
  11.       super.activate();
  12.       this._visible = true;
  13.    }
  14.    function deactivate()
  15.    {
  16.       super.deactivate();
  17.    }
  18.    function setObstacle()
  19.    {
  20.       this.Etat = "Appear";
  21.       this.gotoAndStop("Appear");
  22.       this.activate();
  23.       this.onRelease = this.fRemove;
  24.    }
  25.    function fRemove()
  26.    {
  27.       this.Etat = "Disapear";
  28.       this.gotoAndStop("Disapear");
  29.       this.deactivate();
  30.       delete this.onRelease;
  31.       _global.C.removeObstacle(this);
  32.    }
  33.    function getType()
  34.    {
  35.       return this.STRING_TYPE;
  36.    }
  37.    function cancelAction()
  38.    {
  39.       this._visible = false;
  40.    }
  41.    function Appear()
  42.    {
  43.       if(this.Anim._currentframe == this.Anim._totalframes)
  44.       {
  45.          this.Etat = "Idle";
  46.          this.gotoAndStop("Idle");
  47.       }
  48.    }
  49.    function Idle()
  50.    {
  51.    }
  52.    function Disapear()
  53.    {
  54.       if(this.Anim._currentframe == this.Anim._totalframes)
  55.       {
  56.          this.cancelAction();
  57.       }
  58.    }
  59. }
  60.